#ifndef _GWLIB_GW_FILE_H_
#define _GWLIB_GW_FILE_H_

#include "gwlib/gw_login.h"
#include "gwlib/gw_dir.h"

namespace dicom {


typedef int (*ReadFileCallback)(void* buf, size_t len, void* data);
int UploadFile(GwToken* t, 
               const std::string& pid,
               const std::string& name, 
               size_t size,
               time_t mtime,
               ReadFileCallback cb,
               void* data,
               DirEntry* result);

typedef int(*WriteFileCallback)(const void* buf, size_t len, void* data);
int DownloadFile(GwToken* t, 
                 const std::string& id,
                 WriteFileCallback cb,
                 void* data);

int DeleteFile(GwToken* t, 
               const std::string& id);

int RenameFile(GwToken* t,
               const std::string& id,
               const std::string& pid,
               const std::string& name);

}

#endif // _GWLIB_GW_FILE_H_
